//
//  ICMUploadMusicApi.m
//  ICrEAM
//
//  Created by kuroro on 16/12/1.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "ICMUploadMusicApi.h"

@implementation ICMUploadMusicApi{
    NSURL *_imusicUrl;
}

- (id)initWithMusicUrl:(NSURL *)musicUrl{
    self = [super init];
    if (self) {
        _imusicUrl = musicUrl;
    }
    return self;
}

- (YTKRequestMethod)requestMethod {
    return YTKRequestMethodPost;
}

- (NSString *)requestUrl {
    return [NSString stringWithFormat:@"http://%@/INFO_ICREAM_WEB/App/uploadMusic",[[ICreamCache sharedInstance] stringForKey:kIPPath]];
}
- (AFConstructingBlock)constructingBodyBlock {
    return ^(id<AFMultipartFormData> formData) {
        
        [formData appendPartWithFileURL:_imusicUrl name:@"FILE" error:nil];
    };
}

//- (id)requestArgument {
//return @{
//             @"file":@""
//             };
//}

//- (NSString *)responseImageId {
//    NSDictionary *dict = self.responseJSONObject;
//    return dict[@"imageId"];
//}

@end
